How to update this axios service for being able conditionally decide which API URL to use